//路由规则 和实例化路由对象
import Vue from 'vue';
import VueRouter from 'vue-router';

import Home from '@/components/Home.vue';
import Detail from '@/components/Detail.vue';
import yingpian from '@/components/yingpian.vue';
Vue.use(VueRouter);
export default new VueRouter({
    routes:[
        {
           path: '/home',
           component:Home
        },
        {
            path:'/film/:id',
            name:'love',
            component:Detail
        },
        {
            path:'/yingpian',
            name:'list',
            component:yingpian
        },
        {
            path:'*',
            redirect:'/home'
        }
    ]
})